package com.example.filetest;

/*
 * stream流创建以及中间方法
 * */

import java.util.ArrayList;
import java.util.Collections;

public class Test05 {
    public static void main(String[] args) {


        ArrayList<Integer> list = new ArrayList<>();
        ArrayList<Integer> list1 = new ArrayList<>();
        Collections.addAll(list1, 77, 88, 99);
        Collections.addAll(list, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 9, 9);
        list.stream()
                .filter(integer -> integer > 2)
                .limit(11)
                .skip(1)
                .distinct()
                .map(integer -> String.valueOf(integer))
                .forEach(s -> System.out.println(s));


    }
}
